CREATE TABLE [dbo].[TDREPO_COMP]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[ST_COMP] [dbo].[TD_VC_001] NOT NULL,
[NU_PLAN] [dbo].[TD_VC_008] NOT NULL,
[CO_DESC] [dbo].[TD_VC_005] NULL,
[NO_DESC] [dbo].[TD_VC_050] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDREPO_CO__CO_US__79B300FB] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDREPO_CO__FE_US__7AA72534] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDREPO_CO__CO_US__7B9B496D] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDREPO_CO__FE_US__7C8F6DA6] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDREPO_COMP] ADD CONSTRAINT [PK__TDREPO_C__BC5E513624C84789] PRIMARY KEY CLUSTERED  ([CO_EMPR], [ST_COMP], [NU_PLAN]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDREPO_COMP] ADD CONSTRAINT [FK__TDREPO_COMP__6D630406] FOREIGN KEY ([CO_EMPR], [ST_COMP], [NU_PLAN]) REFERENCES [dbo].[TCREPO_COMP] ([CO_EMPR], [ST_COMP], [NU_PLAN])
GO
